package io.gitee.hefrankeleyn.hhconfig.client.service.impl;

import io.gitee.hefrankeleyn.hhconfig.client.service.HhConfigService;

import java.util.HashMap;
import java.util.Map;

/**
 * @Date 2024/5/29
 * @Author lifei
 */
public class HhConfigServiceImpl implements HhConfigService {

    private Map<String, String> conf = new HashMap<>();

    public HhConfigServiceImpl(Map<String, String> conf) {
        this.conf = conf;
    }

    @Override
    public String[] getPropertyNames() {
        return conf.keySet().toArray(new String[0]);
    }

    @Override
    public String getProperty(String name) {
        return conf.get(name);
    }
}
